package chances.epg.ui.taglib.html;

import java.util.Map;

import javax.servlet.jsp.JspException;

import chances.epg.ui.config.EpgUIResolver;
import chances.epg.ui.taglib.model.EpgPageContext;
import chances.epg.ui.taglib.model.Rect;

public class HeadTag  extends EpgBodyTagSupport{
	/**
	 * 
	 */
	private static final long serialVersionUID = -3753342024412824142L;
	
	private String size;
	
	private String title;
	
	
	@Override
	public void doAfterStart() throws JspException {
		if(size!=null){
			String[] wh = size.split("\\*");
			Rect rect = new Rect( 0,0, Integer.parseInt(wh[0]),Integer.parseInt(wh[1]));
			epgPageContext.setViewport(rect);
		}
	
		super.doAfterStart();
	}
	

	@Override
	public int doStartTag() throws JspException {
		super.id = "head";
		return super.doStartTag();
	}


	@Override
	public String getVm() {
		return "head";
	}

	@Override
	public void addParameter(Map<String, Object> params) {
		// TODO Auto-generated method stub
		
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}

	public String getSize() {
		return size;
	}

	public String getTitle() {
		return title;
	}

	public void setSize(String size) {
		this.size = size;
	}

	public void setTitle(String title) {
		this.title = title;
	}


	
	

}


